<template>
  <div class="left-container">
    <h3>Left 组件</h3>
    <button @click="getInfo">发起 get 请求</button>
    <button @click="btnGetBook">获取数据</button>
  </div>
</template>

<script>
// import axios from 'axios'

export default {
  name: "Left",
  methods:{
    async getInfo(){
      const {data : res} = await this.$http.get('/api/get')
      console.log(res)
    },
    // 获取图书数据
    async btnGetBook(){
      const {data : res} = await this.$http.get('/api/getbooks')
      console.log(res)
    }

  }

}
</script>

<style lang="less" scoped>
.left-container{
  background-color: chartreuse;
  min-height: 200px;
  flex: 1;
}
</style>